import request from '@/plugins/axios'
//应收分页
export function collectionPage(query) {
    return request({
        url: '/api/collectionreceivable/page',
        method: 'get',
        params: query
    })
}
//合同基本信息分页查询
export function getCollectionPageList(query) {
    return request({
        url: '/api/collectionreceivable/getRentContractPageList',
        method: 'get',
        params: query
    })
}
//应收提交
export function updateCollectionByCommit(id) {
    return request({
        url: '/api/collectionreceivable/updateCollectionReceivableByCommit/' + id,
        method: 'get'
    })
}
//判断是否能应收调整
export function isAdjustment(id) {
    return request({
        url: '/api/collectionreceivableadjustment/isAdjustment/' + id,
        method: 'get'
    })
}
//新增自有物业
export function addCollection(obj) {
    return request({
        url: '/api/collectionreceivable',
        method: 'post',
        data: obj
    })
}
//应收查看
export function getCollection(id) {
    return request({
        url: '/api/collectionreceivable/' + id,
        method: 'get'
    })
}
//操作记录
export function getApprovalRecord(id) {
    return request({
        url: '/api/commonapprovalrecord/' + id,
        method: 'get'
    })
}
//审批
export function Approve(data) {
    return request({
        url: '/api/collectionreceivable/updateCollectionReceivableByReviewed',
        method: 'post',
        data: {},
        params: data
    })
}
//实收分页查询
export function collectionActualPage(query) {
    return request({
        url: '/api/collectionactualt/page',
        method: 'get',
        params: query
    })
}
//实收查看
export function getCollectionActual(id) {
    return request({
        url: '/api/collectionactualt/' + id,
        method: 'get'
    })
}
//实收提交
export function addCollectionActual(obj) {
    return request({
        url: '/api/collectionactualt',
        method: 'post',
        data: obj
    })
}
//回收押金提交
export function addCollectionRefund(obj) {
    return request({
        url: '/api/collectionrefund',
        method: 'post',
        data: obj
    })
}
//退款台账分页查询
export function collectionRefundPage(query) {
    return request({
        url: '/api/collectionrefund/page',
        method: 'get',
        params: query
    })
}
//通过id查询应收调整
export function getAdjustment(id) {
    return request({
        url: '/api/collectionreceivableadjustment/' + id,
        method: 'get'
    })
}
//新增付款管理-应付调整台账
export function addAdjustment(obj) {
    return request({
        url: '/api/collectionreceivableadjustment',
        method: 'post',
        data: obj
    })
}
//应付调整分页
export function adjustmentPage(query) {
    return request({
        url: '/api/collectionreceivableadjustment/page',
        method: 'get',
        params: query
    })
}
//应付调整提交审批
export function updatePayableAdjustmentByCommit(id) {
    return request({
        url: '/api/collectionreceivableadjustment/updateReceivableAdjustmentByCommit/' + id,
        method: 'get'
    })
}
//应付调整复核审批
export function ApproveByAdjustment(data) {
    return request({
        url: '/api/collectionreceivableadjustment/updateReceivableAdjustmentByAdjustment',
        method: 'post',
        data: {},
        params: data
    })
}
//通过id查询退款台账
export function getCollectionrefund(id) {
    return request({
        url: '/api/collectionrefund/' + id,
        method: 'get'
    })
}
// 判断是否能应付调整或者复核通过
export function changeAdjustment(id) {
    return request({
        url: '/api/collectionbill/getBillByReceivableIds/' + id,
        method: 'get'
    })
}
//更新可退金额
export function getRefundAmountCount(id) {
    return request({
        url: '/api/collectionrefund/getRefundAmountCount/' + id,
        method: 'get'
    })
}
//收款项目调整查询接口
export function getReceiptAdjustment(query) {
	return request({
		url: '/api/collectionreceivable/getByContractAndStatus',
		method: 'get',
		params: query
	})
}
//收款项目调整提交
export function updateReceivableById(obj) {
	return request({
		url: '/api/collectionreceivable/updateReceivableById',
		method: 'put',
		data: obj
	})
}
